import request from '@/utils/request'

// 查询销售正式订单列表
export function listSalesorder(query) {
  return request({
    url: '/sales/salesorder/list',
    method: 'get',
    params: query
  })
}

// 查询销售正式订单详细
export function getSalesorder(id) {
  return request({
    url: '/sales/salesorder/' + id,
    method: 'get'
  })
}

// 新增销售正式订单
export function addSalesorder(data) {
  return request({
    url: '/sales/salesorder',
    method: 'post',
    data: data
  })
}

// 修改销售正式订单
export function updateSalesorder(data) {
  return request({
    url: '/sales/salesorder',
    method: 'put',
    data: data
  })
}
// 修改销售正式订单
export function splitSalesorder(data) {
  return request({
    url: '/sales/salesorder/splitSalesorder',
    method: 'put',
    data: data
  })
}

// 删除销售正式订单
export function delSalesorder(id) {
  return request({
    url: '/sales/salesorder/' + id,
    method: 'delete'
  })
}
// 删除销售正式订单
export function pushSalesorder(id) {
  return request({
    url: '/sales/salesorder/push/' + id,
    method: 'post'
  })
}
